package com.lanou3g.ptp.entity;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.Date;

@ApiModel("签到时间规则")
@Data
@NoArgsConstructor
@AllArgsConstructor
@Builder
public class SignInDate implements Serializable {

    @ApiModelProperty("签到时间规则ID")
    private Long id;

    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @ApiModelProperty("需要签到的日期")
    private Date date;

    @ApiModelProperty("任务id")
    private Long taskId;

    @ApiModelProperty(name = "状态", hidden = true)
    private Integer status;

    @ApiModelProperty(name = "创建时间", hidden = true)
    private Date createTime;

    @ApiModelProperty(name = "更新时间", hidden = true)
    private Date updateTime;

    public SignInDate(Date date, Long taskId, Integer status, Date createTime, Date updateTime) {
        this.date = date;
        this.taskId = taskId;
        this.status = status;
        this.createTime = createTime;
        this.updateTime = updateTime;
    }
}
